package com.hmdp.controller;

import com.hmdp.annotion.PreventDuplicateSubmit;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/form")
public class FormController {

    @PostMapping("/submit")
    @PreventDuplicateSubmit(timeout = 5) // 5秒内禁止重复提交
    public String submitForm() {
        // 处理表单提交逻辑
        return "Form submitted successfully!";
    }
}